﻿using System;
namespace Pay.DTO {
	/// <summary>
	/// 请求报文
	/// </summary>
	public class model_req<T> where T : new() {
		public model_req() {
			body = new T();
		}
		/// <summary>
		/// 基本报文
		/// </summary>
		public head_req head { get; set; }
		/// <summary>
		/// 请求报文
		/// </summary>
		public T body { get; set; }
	}
	/// <summary>
	/// 基本请求报文
	/// </summary>
	public class head_req {
        public head_req() {
            timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        }

		/// <summary>
		/// 请求时间：yyyy-MM-dd hh:mm:ss
		/// </summary>
		public string timestamp { get; set; }
		/// <summary>
		/// 10位随机数字，可以用UNIX时间截
		/// </summary>
		public string nonce { get; set; }
		/// <summary>
		/// 商户号
		/// </summary>
		public string merchant_no { get; set; }
		/// <summary>
		/// 进件商户号
		/// </summary>
		public virtual string bind_no { get; set; }
		/// <summary>
		/// 方法名称
		/// </summary>
		public string method { get; set; }
		/// <summary>
		/// 签名
		/// </summary>
		public string sign { get; set; }
	}
	/// <summary>
	/// 基本请求报文，有分页
	/// </summary>
	public class head_req_page : head_req {
		/// <summary>
		/// 当前分页
		/// </summary>
		public int page { get; set; }

		/// <summary>
		/// 每页N条，默认10条
		/// </summary>
		public int size { get; set; }
	}
}
